{extend name="admin/public/base"/}
{block name="body"}

<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">{$meta_title}</h3>
	</div>
	<div class="box-body">
		<form method="post" class="form form-horizontal" role="form">
			<div class="form-group">
				<label class="col-sm-2 control-label">配置标识</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" style="width: 400px" name="name" value="{$info['name']|default=''}">            
					<span class="help-block">（用于config函数调用，只能使用英文且不能重复）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">配置标题</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" style="width:400px;" name="title" value="{$info['title']|default=''}">            
					<span class="help-block">（用于后台显示的配置标题）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">排序</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" style="width: 400px" name="sort" value="{$info['sort']|default=0}">            
					<span class="help-block">（用于分组显示的顺序）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">配置类型</label>
				<div class="col-sm-8">
					<select name="type" class="form-control" style="width:auto;">
						{volist name="config['config_type_list']" id="item"}
						<option value="{$item['key']}" {if isset($info['type']) && $item['key'] == $info['type']}selected{/if}>{$item['label']}</option>
						{/volist}
					</select>
					<span class="help-block">（系统会根据不同类型解析配置值）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">配置分组</label>
				<div class="col-sm-8">
					<select name="group" class="form-control" style="width: auto">
						<option value="0">不分组</option>
						{volist name="config['config_group_list']" id="item"}
						<option value="{$item['key']}" {if isset($info['group']) && $item['key'] == $info['group']}selected{/if}>{$item['label']}</option>
						{/volist}
					</select>
					<span class="help-block">（配置分组 用于批量设置 不分组则不会显示在系统设置中）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">配置值</label>
				<div class="col-sm-8">
					<textarea name="value" class="form-control" style="width: 80%;height: 120px">{$info['value']|default=''}</textarea>
					<span class="help-block">（配置值）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">配置项</label>
				<div class="col-sm-8">
					<textarea name="extra" class="form-control" style="width: 80%;height: 120px">{$info['extra']|default=''}</textarea>
					<span class="help-block">（如果是枚举型 需要配置该项）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">说明</label>
				<div class="col-sm-8">
					<textarea name="remark" class="form-control" style="width: 80%;height: 120px">{$info['remark']|default=''}</textarea>
					<span class="help-block">（配置详细说明）</span>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-8">
					<input type="hidden" name="id" value="{$info.id|default=''}">            
					<button class="btn btn-success submit-btn" type="submit">确 定</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}